Skip to content

Protect existing local branches during setup by default#67

Merged
NagyVikt merged 1 commit intomainfrom
agent/codex/thedailyscooby-gmail-com-dup-2-gx-setup-protect-local-branches
Apr 13, 2026
Merged

Protect existing local branches during setup by default#67
NagyVikt merged 1 commit intomainfrom
agent/codex/thedailyscooby-gmail-com-dup-2-gx-setup-protect-local-branches

Conversation

@NagyVikt
Copy link
Copy Markdown
Collaborator

Automated by scripts/agent-branch-finish.sh (PR flow).

Users with local long-lived branches were only getting dev/main/master protected after gx setup, which left their active branch unguarded unless they manually ran gx protect add. This change teaches setup to discover local non-agent branches and append missing names to multiagent.protectedBranches while preserving defaults and existing config order.

Constraint: Preserve existing default protected branches and avoid duplicate config entries

Rejected: Only protect the current branch | misses other existing local user branches

Confidence: high

Scope-risk: narrow

Reversibility: clean

Directive: Keep setup-time protection logic aligned with gx protect command semantics

Tested: node --check bin/multiagent-safety.js

Tested: node --test test/install.test.js

Tested: npm test
@NagyVikt NagyVikt merged commit 988c6cc into main Apr 13, 2026
7 checks passed
@NagyVikt NagyVikt deleted the agent/codex/thedailyscooby-gmail-com-dup-2-gx-setup-protect-local-branches branch April 13, 2026 18:27
@NagyVikt NagyVikt restored the agent/codex/thedailyscooby-gmail-com-dup-2-gx-setup-protect-local-branches branch April 13, 2026 18:32
@NagyVikt NagyVikt deleted the agent/codex/thedailyscooby-gmail-com-dup-2-gx-setup-protect-local-branches branch April 13, 2026 19:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant